home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / games / nhak_src.zip / UNIXCONF.H < prev    next >
C/C++ Source or Header  |  1993-03-16  |  6KB  |  207 lines

  1. /*    SCCS Id: @(#)unixconf.h    3.0    88/07/21
  2. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  3. /* NetHack may be freely redistributed.  See license for details. */
  4.  
  5. #ifdef UNIX
  6. #ifndef UNIXCONF_H
  7. #define UNIXCONF_H
  8.  
  9. /*
  10.  * Some include files are in a different place under SYSV
  11.  *     BSD           SYSV
  12.  * <sys/time.h>        <time.h>
  13.  * <sgtty.h>        <termio.h>
  14.  *
  15.  * Some routines are called differently
  16.  * index        strchr
  17.  * rindex        strrchr
  18.  *
  19.  */
  20.  
  21. /* define one of the following */
  22. /* #define BSD        /* define for 4.n BSD  */
  23.             /* also for relatives like SunOS and DG/UX */
  24. #define ULTRIX        /* define for Ultrix v3.0 or higher (but not lower) */
  25.             /* Use BSD for < v3.0 */
  26.             /* "ULTRIX" not to be confused with "ultrix" */
  27. /* #define SYSV        /* define for System V */
  28. /* #define HPUX        /* Hewlett-Packard's Unix, version 6.5 or higher */
  29.             /* use SYSV for < v6.5 */
  30.  
  31.  
  32. /* define any of the following that are appropriate */
  33. /* #define NETWORK    /* if running on a networked system */
  34.             /* e.g. Suns sharing a playground through NFS */
  35. /* #define GENIX    /* Yet Another Unix Clone */
  36. /* #define HISX        /* Bull Unix for XPS Machines */
  37. /* #define UNIXPC    /* use in addition to SYSV for AT&T 7300/3B1 */
  38.             /* also note that the stock cpp qualifies as a
  39.                STUPID_CPP for config.h */
  40.  
  41. /* #define PYRAMID_BUG     /* avoid a bug on the Pyramid */
  42. /* #define APOLLO    /* same for the Apollo */
  43. /* #define BSD_43_BUG    /* for real 4.3BSD cc's without schain botch fix */
  44. /* #define MICROPORT_BUG /* problems with large arrays in structs */
  45. /* #define MICROPORT_286_BUG /* Changes needed in termcap.c to get it to
  46.                run with Microport Sys V/AT version 2.4.
  47.                By Jay Maynard */
  48. /* #define AIXPS_2BUG    /* avoid a problem with little_to_big() optimization */
  49.  
  50. /* #define RANDOM    /* if neither random/srandom nor lrand48/srand48
  51.                is available from your system */
  52. /* #define TEXTCOLOR    /* Use System V r3.2 terminfo color support */
  53.  
  54.  
  55. /*
  56.  * The next two defines are intended mainly for the Andrew File System,
  57.  * which does not allow hard links.  If NO_FILE_LINKS is defined, lock files
  58.  * will be created in LOCKDIR using open() instead of in the playground using
  59.  * link().
  60.  *        Ralf Brown, 7/26/89 (from v2.3 hack of 10/10/88)
  61.  */
  62.  
  63. /* #define NO_FILE_LINKS    /* if no hard links */
  64. /* #define LOCKDIR "/usr/games/lib/nethackdir"    /* where to put locks */
  65.  
  66.  
  67. /*
  68.  * Define DEF_PAGER as your default pager, e.g. "/bin/cat" or "/usr/ucb/more"
  69.  * If defined, it can be overridden by the environment variable PAGER.
  70.  * Hack will use its internal pager if DEF_PAGER is not defined.
  71.  * (This might be preferable for security reasons.)
  72.  * #define DEF_PAGER    ".../mydir/mypager"
  73.  */
  74.  
  75.  
  76.  
  77. /*
  78.  * If you define MAIL, then the player will be notified of new mail
  79.  * when it arrives.  If you also define DEF_MAILREADER then this will
  80.  * be the default mail reader, and can be overridden by the environment
  81.  * variable MAILREADER; otherwise an internal pager will be used.
  82.  * A stat system call is done on the mailbox every MAILCKFREQ moves.
  83.  */
  84.  
  85. #define MAIL            /* Deliver mail during the game */
  86.  
  87. /* The Andrew Message System does mail a little differently from normal
  88.  * UNIX.  Mail is deposited in the user's own directory in ~/Mailbox 
  89.  * (another directory).  MAILBOX is the element that will be added on to 
  90.  * the user's home directory path to generate the Mailbox path - just in 
  91.  * case other Andrew sites do it differently from CMU.
  92.  *
  93.  *        dan lovinger
  94.  *        dl2n+@andrew.cmu.edu (dec 19 1989)
  95.  */
  96.  
  97. /* #define AMS            /* use Andrew message system for mail */
  98.  
  99. /* NO_MAILREADER is for kerberos authentcating filesystems where it is
  100.  * essentially impossible to securely exec child proccesses, like mail
  101.  * readers, when the game is running under a special token.
  102.  *
  103.  *             dan
  104.  */
  105.  
  106. /* #define NO_MAILREADER     /* have mail daemon just tell player of mail */
  107.  
  108. #ifdef    MAIL
  109. # if defined(BSD) || defined(ULTRIX)
  110. #  ifdef AMS
  111. #define AMS_MAILBOX    "/Mailbox"
  112. #  else
  113. #define    DEF_MAILREADER    "/usr/ucb/Mail"
  114. #  endif
  115. #else
  116. # if defined(SYSV) || defined(DGUX) || defined(HPUX)
  117. #  ifdef M_XENIX
  118. #define    DEF_MAILREADER    "/usr/bin/mail"
  119. #  else
  120. #define    DEF_MAILREADER    "/usr/bin/mailx"
  121. #  endif
  122. # else
  123. #define    DEF_MAILREADER    "/bin/mail"
  124. # endif
  125. #endif
  126.  
  127. #define    MAILCKFREQ    50
  128. #endif    /* MAIL */
  129.  
  130.  
  131.  
  132. #ifdef COMPRESS
  133. /* Some implementations of compress need a 'quiet' option.
  134.  * If you've got one of these versions, put -q here.
  135.  * You can also include any other strange options your compress needs.
  136.  * If you have a normal compress, just leave it commented out.
  137.  */
  138. /* #define COMPRESS_OPTIONS    "-q"    /* */
  139. #endif
  140.  
  141. #define    FCMASK    0660    /* file creation mask */
  142.  
  143.  
  144. /*
  145.  * The remainder of the file should not need to be changed.
  146.  */
  147.  
  148. /*
  149.  * BSD/ULTRIX systems are normally the only ones that can suspend processes.
  150.  * Suspending NetHack processes cleanly should be easy to add to other systems
  151.  * that have SIGTSTP.  Currently the only such system known to work is HPUX;
  152.  * other systems will probably require tweaks to unixtty.c and ioctl.c.
  153.  */
  154. #if defined(BSD) || defined(ULTRIX) || defined (HPUX)
  155. #define    SUSPEND        /* let ^Z suspend the game */
  156. #endif
  157.  
  158.  
  159. #if defined(BSD) || defined(ULTRIX)
  160. #include    <sys/time.h>
  161. #else
  162. #include    <time.h>
  163. #endif
  164.  
  165. #define    HLOCK    "perm"    /* an empty file used for locking purposes */
  166. #define LLOCK    "safelock"    /* link to previous */
  167.  
  168. #ifndef REDO
  169. #define Getchar getchar
  170. #else
  171. #define tgetch getchar
  172. #endif
  173.  
  174. #define SHELL        /* do not delete the '!' command */
  175.  
  176. #include "system.h"
  177.  
  178. #if defined(BSD) || defined(ULTRIX)
  179. # ifndef DGUX
  180. #define memcpy(d, s, n)        bcopy(s, d, n)
  181. #define memcmp(s1, s2, n)    bcmp(s2, s1, n)
  182. # endif
  183. #else    /* therefore SYSV */
  184. #define index    strchr
  185. #define rindex    strrchr
  186. #endif
  187.  
  188. /* Use the high quality random number routines. */
  189. #if defined(BSD) || defined(ULTRIX) || defined(RANDOM)
  190. #define Rand()    random()
  191. #define Srand(seed) srandom(seed)
  192. #else
  193. #define Rand()    lrand48()
  194. #define Srand(seed) srand48(seed)
  195. #endif
  196.  
  197. #ifdef hc    /* older versions of the MetaWare High-C compiler define this */
  198. # ifdef __HC__
  199. #  undef __HC__
  200. # endif
  201. # define __HC__ hc
  202. # undef hc
  203. #endif
  204.  
  205. #endif /* UNIXCONF_H /* */
  206. #endif /* UNIX /* */
  207.